//-----------------------------------------------------------------------------
// MACRO GET-SET-DATA DEFINES
//
#ifndef __MACROGETSET_H
#define __MACROGETSET_H


//#define GetByte(sBuf,index) *((BYTE*)(sBuf+index++))
//#define GetShort(sBuf,index) *((short*)(sBuf+index)),index+=sizeof(short)
//#define GetInt(sBuf,index) *((int*)(sBuf+index)),index+=sizeof(int)
//#define GetDWORD(sBuf,index) *((DWORD*)(sBuf+index)),index+=sizeof(DWORD)
//#define GetINT64(sBuf,index) *((__int64*)(sBuf+index)),index+=sizeof(__int64)
	//#define GetString(tBuf,sBuf,len,index) CopyMemory((tBuf),sBuf+index,(len)),index+=(len)

//#define SetByte(tBuf,sByte,index) *(tBuf+index++)=(char)sByte
//#define SetShort(tBuf,sShort,index) *((short*)(tBuf+index))=(short)sShort,index+=sizeof(short)
//#define SetInt(tBuf,sINT,index) *((int*)(tBuf+index))=(int)sINT,index+=sizeof(int)
//#define SetDWORD(tBuf,sDWORD,index) *((DWORD*)(tBuf+index))=(DWORD)sDWORD,index+=sizeof(DWORD)
//#define SetINT64(tBuf,sINT64,index) *((__int64*)(tBuf+index))=(__int64)sINT64,index+=sizeof(__int64)
//#define SetString(tBuf,sBuf,len,index) CopyMemory(tBuf+index,sBuf,(len)),index+=(len)


#define ReadShort(tBuf,receive,index) receive=*((short*)(tBuf)),index+=sizeof(short)
#define WriteShort(tBuf,sShort,index) *((short*)(tBuf)) = (short)sShort,index+=sizeof(short)
#define ReadInt(sBuf,receive,index) receive=*((int*)(sBuf)),index+=sizeof(int)
#define WriteInt(tBuf,sDWORD,index) *((int*)(tBuf)) = (int)sDWORD,index+=sizeof(int)
#define ReadDWord(sBuf,receive,index) receive=*((DWORD*)(sBuf)),index+=sizeof(DWORD)
#define WriteDWord(tBuf,sDWORD,index) *((DWORD*)(tBuf)) = (DWORD)sDWORD,index+=sizeof(DWORD)
#define Read_int64(sBuf,receive,index) receive=*((__int64*)(sBuf)),index+=sizeof(__int64)
#define Write_int64(tBuf,sINT64,index) *((__int64*)(tBuf)) = (__int64)sINT64,index+=sizeof(__int64)
#define CopyString(tBuf,sBuf,len,index) CopyMemory((tBuf),(sBuf),(len)),index+=(len),(tBuf)[len]='\0'

#endif
